import { addComment } from '@/api/comment/comment';
import * as types from '../types'
export default {
    namespaced: true,
    state:{
        bannerList:[]
    },
    mutations:{
        [types.SET_BANNER](state,list){
            state.bannerList = list;
        }
    },
    actions:{
        async [types.ADD_COMMENT]({commit},data){
            let res = await addComment(data)
            if (res.code === 0) {
                return res.data
            } else {
                // 获取失败
                return Promise.reject(res.data)
            }
        }
    }

}